<template>
    <div class="demo">
        <div class="head" style="display: flex;flex-direction:row;">
            <div class="avatar" style="display: flex;justify-items: flex-end;"></div>
            <div class="name" style="display: flex;justify-items: flex-end;"></div>
        </div>
        <div class="body" style="display: flex;flex-direction:row;">
            <div class="context" v-html="context"></div>
        </div>
        <div class="end" style="display: flex;flex-direction:row;">
            <div class="review" style="display: flex;justify-items: flex-end;">
                <!-- <el-icon><ChatRound /></el-icon> -->
                <el-icon color="rgb(121, 187, 255)" size="16"><ChatDotRound /></el-icon>
                <p style="margin: 0 0 0 3px;">回复</p>
            </div>
            <div class="upvote" style="display: flex;justify-items: flex-end;">
                <el-icon color="rgb(245, 45, 45)" size="16"><IceTea /></el-icon>
                <p style="margin: 0 0 0 3px;">{{ ((upvote>0)?updateNumber(upvote):'喜欢') }}</p>
            </div>
        </div>
    </div>
</template>

<script>
import usePostStore from "@/store/forum/post"

export default {
    name: "postDetail",
    data(){
        return {
            avatar: '',
            name: '',
            context: '<p>震惊！</p>',
            upvote: 522,

        }
    },
    created(){
    },
    methods:{
        updateNumber(number){
          // console.log(number)
          return usePostStore().normalizeNumber(number);
        },
    }
}
</script>
  
<style scoped lang="scss">
</style>